#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QSerialPort>
#include <QTimer>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

private slots:
    void on_connButton_clicked(bool checked);
    void on_readyRead(void);

    void on_ledButton_clicked(bool checked);
    void on_timeout(void);

    void on_pushButton_pressed();

    void on_pushButton_released();

private:
    Ui::Widget *ui;
    QSerialPort* serial;
    QTimer* timer;
    int time;
};
#endif // WIDGET_H
